package com.dal.log.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @ProjectName: springboot
 * @ClassName: LogController
 * @Author: jian
 * @Description:
 * @Date: 2021/4/8 16:47
 * @Version: 1.0
 */


@RestController
public class LogController {

    /*private static Logger log = Logger.getLogger(LogController.class);*/

    @RequestMapping("/log")
    public String log(){
        //log.info("log4j测试=============================>>>>");
        return "log";
    }

    public static void main(String[] args) {

        String beginTime = "2018-07-28 14:42:32";
        String endTime = "2018-07-29 12:26:32";

        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        try {
            Date date1 = format.parse(beginTime);
            Date date2 = format.parse(endTime);

            boolean before = date1.before(date2);

            System.out.println(before);

        } catch (ParseException e) {
            e.printStackTrace();
        }


    }


}
